package com.practice.retry;

import org.apache.log4j.Logger;

public class RetryTaskHandler {
	
	//private static final Logger logger = Logger.getLogger(RetryTaskHandler.class.getSimpleName());
	
	private int maxRetryCount = getDefaultMaxRetryCount();
	private int sleepMilliseconds = getDefaultSleepMilliseconds();
	private Logger taskLogger;
	
	
	protected static int getDefaultMaxRetryCount() {
		return 3;
	}
	
	protected static int getDefaultSleepMilliseconds() {
		return 1000;
	}
	
	

	public int getMaxRetryCount() {
		return maxRetryCount;
	}

	public void setMaxRetryCount(int maxRetryCount) {
		this.maxRetryCount = maxRetryCount;
	}

	public int getSleepMilliseconds() {
		return sleepMilliseconds;
	}

	public void setSleepMilliseconds(int sleepMilliseconds) {
		this.sleepMilliseconds = sleepMilliseconds;
	}
	
	public Logger getTaskLogger() {
		return taskLogger;
	}

	public void setTaskLogger(Logger taskLogger) {
		this.taskLogger = taskLogger;
	}
}
